Global Index
HTML5 JS API Index > CSS Object Model Tutorials & Specs

CSSRule

Extended by CSSHostRule, CSSRule (Shadow DOM), CSSStyleRule, CSSCharsetRule, CSSImportRule, CSSGroupingRule, CSSMarginRule, CSSNamespaceRule, SVGCSSRule, SVGCSSRule

The CSSRule interface represents an abstract, base CSS style rule. Each distinct CSS style rule type is represented by a distinct interface that inherits from this interface.

Properties
const unsigned short
CHARSET_RULE = 2
Return CHARSET_RULE (numberic value 2).
const unsigned short
FONT_FACE_RULE = 5
Return FONT_FACE_RULE (numeric value 5).
const unsigned short
HOST_RULE = 1001
When the value of the type attribute is HOST_RULE, then the object that implements this interface must implement CSSHostRule interface.
const unsigned short
IMPORT_RULE = 3
Return IMPORT_RULE (numberic value 3).
const unsigned short
MARGIN_RULE = 9
Return MARGIN_RULE (numeric value 9).
const unsigned short
MEDIA_RULE = 4
Return MEDIA_RULE (numeric value 4).
const unsigned short
NAMESPACE_RULE = 10
Return NAMESPACE_RULE (numeric value 10).
const unsigned short
PAGE_RULE = 6
Return PAGE_RULE (numeric value 6).
const unsigned short
STYLE_RULE = 1
Return STYLE_RULE (numeric value 1).
DOMString
cssText
The cssText attribute must return a serialization of the CSS rule.
CSSRule?
parentRule
The parentRule attribute must return the parent CSS rule.
CSSStyleSheet?
parentStyleSheet
The parentStyleSheet attribute must return the parent CSS style sheet.
unsigned shorttype
Referenced by
CSSRuleListitem(...)
CSSStyleDeclarationparentRule
CSSStyleSheetownerRule